package java006;

import java.util.ArrayList;
import java.util.Iterator;

public class zuoye06 {
    public static void main(String[] args) {
        int[] arr1 = {1,2,3};
        int[] arr2 = {3,4,5,2};
        ArrayList<Integer> arr3 = new ArrayList<>();
        ArrayList<Integer> arr4 = new ArrayList<>();
        for(int num: arr1){
            arr3.add(num);
        }
        for(int num: arr2){
            arr4.add(num);
        }
        ArrayList<Integer> result = new ArrayList<>();
        Iterator<Integer> iterator1 = arr3.iterator();
        while(iterator1.hasNext()){
            int num = iterator1.next();
            if(!arr4.contains(num)){
                result.add(num);
            }
        }
        Iterator<Integer> iterator = arr4.iterator();
        while(iterator.hasNext()){
            int num = iterator.next();
            if(!arr3.contains(num)){
                result.add(num);
            }
        }
        System.out.println(result);
    }
}